package com.wuzhi.shop.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.wuzhi.common.validator.group.AddGroup;
import com.wuzhi.common.validator.group.UpdateGroup;
import com.wuzhi.common.validator.group.UpdateStatusGroup;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.*;

/**
 * Ʒ?
 * 
 * @author gonglize
 * @email 2567007734@gmail.com
 * @date 2022-03-09 18:26:53
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 品牌id:
	 * 1. 自增
	 * 2. 校验分组
	 */
	@NotNull(message = "修改必须指定品牌id",groups = {UpdateGroup.class})
//	@Null(message = "新增不能指定id",groups = {AddGroup.class})
	@TableId
	private Long brandId;
	/**
	 */
//	@NotBlank(message = "品牌名必须提交",groups = {UpdateGroup.class,AddGroup.class})
	private String name;
	/**
	 */
//	@NotEmpty(groups = {AddGroup.class})
//	@URL(message = "logo必须是一个合法的地址",groups = {UpdateGroup.class,AddGroup.class})
	private String logo;
	/**
	 *描述
	 */
	private String descript;
	/**
	 */
//	@NotEmpty(groups = {UpdateStatusGroup})
	@TableLogic(value = "1",delval = "0")
	private Integer showStatus;
	/**
	 */
//	@NotEmpty(groups = {AddGroup.class})
//	@Pattern(regexp = "/^[a-zA-Z]$/",message = "必须为一个字母",groups = {UpdateGroup.class,AddGroup.class})
	private String firstLetter;
	/**
	 */
//	@NotEmpty(groups = {AddGroup.class})
//	@Min(value = 0,message = "排序为非负整数",groups = {UpdateGroup.class,AddGroup.class})
	private Integer sort;

}
